Integrand size = 23, antiderivative size = 70 \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {A x}{a^2}-\frac {(4 A-B) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A-B) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4007, 4004, 3879} \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=-\frac {(4 A-B) \tan (c+d x)}{3 a^2 d (\sec (c+d x)+1)}+\frac {A x}{a^2}-\frac {(A-B) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
[In]
[Out]
Rule 3879
Rule 4004
Rule 4007
Rubi steps \begin{align*} \text {integral}& = -\frac {(A-B) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\int \frac {-3 a A+a (A-B) \sec (c+d x)}{a+a \sec (c+d x)} \, dx}{3 a^2} \\ & = \frac {A x}{a^2}-\frac {(A-B) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(4 A-B) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx}{3 a} \\ & = \frac {A x}{a^2}-\frac {(A-B) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(4 A-B) \tan (c+d x)}{3 d \left (a^2+a^2 \sec (c+d x)\right )} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(153\) vs. \(2(70)=140\).
Time = 0.60 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.19 \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^3\left (\frac {1}{2} (c+d x)\right ) \left (9 A d x \cos \left (\frac {d x}{2}\right )+9 A d x \cos \left (c+\frac {d x}{2}\right )+3 A d x \cos \left (c+\frac {3 d x}{2}\right )+3 A d x \cos \left (2 c+\frac {3 d x}{2}\right )-18 A \sin \left (\frac {d x}{2}\right )+6 B \sin \left (\frac {d x}{2}\right )+12 A \sin \left (c+\frac {d x}{2}\right )-6 B \sin \left (c+\frac {d x}{2}\right )-10 A \sin \left (c+\frac {3 d x}{2}\right )+4 B \sin \left (c+\frac {3 d x}{2}\right )\right )}{24 a^2 d} \]
[In]
[Out]
Time = 0.67 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.70
method | result | size |
parallelrisch | \(\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (-9 A +3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+6 A x d}{6 a^{2} d}\) | \(49\) |
norman | \(\frac {\frac {A x}{a}+\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}-\frac {\left (3 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}}{a}\) | \(60\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +4 A \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(74\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +4 A \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(74\) |
risch | \(\frac {A x}{a^{2}}-\frac {2 i \left (6 A \,{\mathrm e}^{2 i \left (d x +c \right )}-3 B \,{\mathrm e}^{2 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )} A -3 B \,{\mathrm e}^{i \left (d x +c \right )}+5 A -2 B \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}\) | \(85\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.34 \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {3 \, A d x \cos \left (d x + c\right )^{2} + 6 \, A d x \cos \left (d x + c\right ) + 3 \, A d x - {\left ({\left (5 \, A - 2 \, B\right )} \cos \left (d x + c\right ) + 4 \, A - B\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {A}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec {\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.71 \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=-\frac {A {\left (\frac {\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )} - \frac {B {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, d} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.21 \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {\frac {6 \, {\left (d x + c\right )} A}{a^{2}} + \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
[In]
[Out]
Time = 13.57 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.93 \[ \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx=\frac {3\,B\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-9\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-B\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+6\,A\,d\,x}{6\,a^2\,d} \]
[In]
[Out]